{% macro general(charset="C.UTF-8") -%}
ENV TERM="xterm" \
    LANG="{{ charset }}" \
    LC_ALL="{{ charset }}"
{%- endmacro %}


{% macro mailbox() -%}
ENV MAILBOX_USERNAME="dev" \
    MAILBOX_PASSWORD="dev"
{%- endmacro %}


{% macro web() -%}
ENV WEB_DOCUMENT_ROOT=/app \
    WEB_DOCUMENT_INDEX=index.php \
    WEB_ALIAS_DOMAIN=*.vm \
    WEB_PHP_TIMEOUT=600 \
    WEB_PHP_SOCKET=""
{%- endmacro %}


{% macro webPhp() -%}
ENV WEB_PHP_SOCKET=127.0.0.1:9000
{%- endmacro %}

{% macro nginx() -%}
ENV SERVICE_NGINX_CLIENT_MAX_BODY_SIZE="50m"
{%- endmacro %}


{% macro phpOfficialSendmailWorkaround() -%}
ENV PHP_SENDMAIL_PATH="/usr/sbin/sendmail -t -i"
{%- endmacro %}


{% macro phpComposerVersion() -%}
ENV COMPOSER_VERSION="2"
{%- endmacro %}


{% macro phpAlpineIconvWorkaround() -%}
ENV LD_PRELOAD="/usr/lib/preloadable_libiconv.so"
{%- endmacro %}


{% macro webDevelopment() -%}
ENV WEB_NO_CACHE_PATTERN="\.(css|js|gif|png|jpg|svg|json|xml)$"
{%- endmacro %}


{% macro ftp() -%}
ENV FTP_USER=application \
    FTP_PASSWORD=application \
    FTP_UID=1000 \
    FTP_GID=1000 \
    FTP_PATH=/data/ftp/
{%- endmacro %}


{% macro base() -%}
ENV DOCKER_CONF_HOME=/opt/docker/ \
    LOG_STDOUT="" \
    LOG_STDERR=""
{%- endmacro %}


{% macro baseApp() -%}
ENV APPLICATION_USER=application \
    APPLICATION_GROUP=application \
    APPLICATION_PATH=/app \
    APPLICATION_UID=1000 \
    APPLICATION_GID=1000
{%- endmacro %}


{% macro liquibase(version, driver, classpath) -%}
ENV LIQUIBASE_VERSION="{{ version }}" \
    LIQUIBASE_DRIVER="{{ driver }}" \
    LIQUIBASE_CLASSPATH="{{ classpath }}" \
    LIQUIBASE_URL="" \
    LIQUIBASE_USERNAME="" \
    LIQUIBASE_PASSWORD="" \
    LIQUIBASE_CHANGELOG="liquibase.xml" \
    LIQUIBASE_CONTEXTS="" \
    LIQUIBASE_OPTS=""
{%- endmacro %}
